<template>
	<view>
		<view class="header">
			<image src="@/static/zuo.png" mode="" style="width: 45upx;height: 45upx;" @click="back"></image>
			<text style="font-size: 36upx;margin-left: 30upx;color: #333;">手机号</text>
			<text style="font-size: 36upx;margin-left: 450upx;color: #333;" @click="queding">确定</text>
		</view>
		<view style="width: 690upx;height: 100upx;background-color: #fff;border-radius: 10upx;margin: 0 auto;margin-top: 200upx;display: flex;align-items: center;">
			<input type="text" v-model="name" placeholder="请输入手机号" style="padding-left: 15upx;">
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name:''
			}
		},
		onLoad(option) {
			if(option.name){
				this.name = option.name
			}else{
				this.name = ''
			}
		},
		methods: {
			back(){
				uni.navigateBack({
					delta:1
				})
			},
			queding(){
				var data ={
					field_name:'user_name',
					field_data:this.name
				}
				this.$http.useben(data).then(res => {
					if (res.status == 200) {
						console.log(res, "保存资料")
						this.$hideLoading()
						uni.showToast({
							title: res.mess
						})
						setTimeout(() => {	
							uni.navigateBack({
								delta:1
							})
						}, 1200)
					} else {
						uni.showToast({
							title: res.mess,
							icon: 'none'
						})
					}
				})
			}
		}
	}
</script>

<style scoped lang="scss">
.header {
		position: fixed;
		background-color: #fff;
		height: 110upx;
		width: 100%;
		top: 0;
		left: 0;
		display: flex;
		z-index: 100;
		align-items: center;
		padding-left: 30upx;
	}
</style>
